+2009-01-13 Christian Dywan <christian@imendio.com>
+
+ Bug 566532 – GtkScaleButton implementation of GtkOrientable
+
+ * gtk/gtk.symbols:
+ * gtk/gtkscalebutton.c (gtk_scale_button_class_init),
+ (gtk_scale_button_set_property):
+ * gtk/gtkscalebutton.h: Deprecate gtk_scale_button_get_orientation
+ in favour of implementing GtkOrientable. Patch by Bruce Cowan.
+
2009-01-13 Tor Lillqvist <tml@iki.fi>
Bug 164002 - query scripts don't work uninstalled on windows
gtk_scale_button_set_value
gtk_scale_button_get_adjustment
gtk_scale_button_set_adjustment
+#ifndef GTK_DISABLE_DEPRECATED
gtk_scale_button_get_orientation
gtk_scale_button_set_orientation
+#endif
gtk_scale_button_get_plus_button
gtk_scale_button_get_minus_button
gtk_scale_button_get_popup
#include "gtkhscale.h"
#include "gtkvscale.h"
#include "gtkframe.h"
+#include "gtkorientable.h"
#include "gtkhbox.h"
#include "gtkvbox.h"
#include "gtkwindow.h"
/* see below for scale definitions */
static GtkWidget *gtk_scale_button_scale_box_new(GtkScaleButton *button);
-static guint signals[LAST_SIGNAL] = { 0, };
+G_DEFINE_TYPE_WITH_CODE (GtkScaleButton, gtk_scale_button, GTK_TYPE_BUTTON,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE,
+ NULL))
-G_DEFINE_TYPE (GtkScaleButton, gtk_scale_button, GTK_TYPE_BUTTON)
+static guint signals[LAST_SIGNAL] = { 0, };
static void
gtk_scale_button_class_init (GtkScaleButtonClass *klass)
*
* Since: 2.14
**/
- g_object_class_install_property (gobject_class,
- PROP_ORIENTATION,
- g_param_spec_enum ("orientation",
- P_("Orientation"),
- P_("The orientation of the scale"),
- GTK_TYPE_ORIENTATION,
- GTK_ORIENTATION_VERTICAL,
- GTK_PARAM_READWRITE));
+ g_object_class_override_property (gobject_class,
+ PROP_ORIENTATION,
+ "orientation");
g_object_class_install_property (gobject_class,
PROP_VALUE,
switch (prop_id)
{
case PROP_ORIENTATION:
- gtk_scale_button_set_orientation (button, g_value_get_enum (value));
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (button), g_value_get_enum (value));
break;
case PROP_VALUE:
gtk_scale_button_set_value (button, g_value_get_double (value));
* Returns: the #GtkScaleButton's orientation.
*
* Since: 2.14
+ *
+ * Deprecated: 2.16: Use gtk_orientable_get_orientation() instead.
**/
GtkOrientation
gtk_scale_button_get_orientation (GtkScaleButton *button)
* Sets the orientation of the #GtkScaleButton's popup window.
*
* Since: 2.14
+ *
+ * Deprecated: 2.16: Use gtk_orientable_set_orientation() instead.
**/
void
gtk_scale_button_set_orientation (GtkScaleButton *button,
GtkAdjustment * gtk_scale_button_get_adjustment (GtkScaleButton *button);
void gtk_scale_button_set_adjustment (GtkScaleButton *button,
GtkAdjustment *adjustment);
-GtkOrientation gtk_scale_button_get_orientation (GtkScaleButton *button);
-void gtk_scale_button_set_orientation (GtkScaleButton *button,
- GtkOrientation orientation);
GtkWidget * gtk_scale_button_get_plus_button (GtkScaleButton *button);
GtkWidget * gtk_scale_button_get_minus_button (GtkScaleButton *button);
GtkWidget * gtk_scale_button_get_popup (GtkScaleButton *button);
+#ifndef GTK_DISABLE_DEPRECATED
+
+GtkOrientation gtk_scale_button_get_orientation (GtkScaleButton *button);
+void gtk_scale_button_set_orientation (GtkScaleButton *button,
+ GtkOrientation orientation);
+
+#endif /* GTK_DISABLE_DEPRECATED */
+
G_END_DECLS
#endif /* __GTK_SCALE_BUTTON_H__ */